import { message } from "antd";
import * as _ from 'lodash'

export const isInteger = /^-?[1-9][0-9]*$/; 

export const isJustInteger = /^[1-9][0-9]*$/; // 正整数

export const isFloatTwo = /^-?(([1-9][0-9]*)(\.?\d{0,2})|(0\.\d{0,2})|0)$/;
export const isJustFloatTwo = /^(([1-9][0-9]*)(\.?\d{0,2})|(0\.\d{0,2})|0)$/;

export const isFloatOne = /^-?(([1-9][0-9]*)(\.?\d{0,1})|(0\.\d{0,1})|0)$/;
export const isJustFloatOne = /^(([1-9][0-9]*)(\.?\d{0,1})|(0\.\d{0,1})|0)$/; // 正的一位小数